<template>
	<view class="ts-column">
		<view class="top"></view>
		<view class="ts-column ts-center" style="margin-top: -150upx;">
			<view class="ts-row">
				<image style="width: 200upx; height: 200upx;" src="../../../../static/images/logo.png" mode=""></image>
			</view>
			<view class="ts-row">产教融合</view>
		</view>
		<qrcode :val="qrcodeLink" :size="qrsize" ref="qrcode"></qrcode>

		<view class="ts-row ts-flex-item  ts-center">
			<ts-share-buttons :providerList="providerList" :shareOptions="shareOptions"></ts-share-buttons>
		</view>
	</view>
</template>

<script>
	import Qrcode from '@/components/qrcode/qrcode.vue';
	import TsShareButtons from '@/components/teaset/components/ts-share/ts-share-buttons.vue';
	export default {
		components: {
			Qrcode,
			TsShareButtons
		},
		data() {
			return {
				qrcodeLink: 'http://www.zengqs.com/share?id=3228969',
				qrsize: uni.upx2px(300),

				// #ifdef APP-PLUS
				providerList: this.$providerList,

				shareOptions: {
					shareType: 0,
					shareImage: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/share-logo@3.png',
					shareTitle: '欢迎体验优职道',
					shareText: '专注在校学生的实习、就业，破解企业招工难题，提供精准就业、精准招聘服务！',
					shareLink: 'http://www.zengqs.com', //生成的二维码的链接，点解分享链接到改页面
					miniProgram: {
						id: 'wx86ab541f20e43dc4',
						path: '/pages/tabbar/home/index',
						webUrl: 'http://www.zengqs.com',
						type: 0
					}
				}
				// #endif
			};
		},
		methods: {},
		onLoad() {
			//必须延时，否则报错
			setTimeout(() => {
				this.$refs.qrcode.creatQrcode();
				//console.log(this.$refs.qrcode.img);
			}, 100);
		}
	};
</script>

<style lang="scss">
	.top {
		width: 100%;
		height: 300upx;
		/* #ifdef  APP-PLUS  */
		// background: url('../../../../static/app-plus/banner.png') no-repeat;
		background: url('http://pds.jyt123.com/wxtest/banner.png') no-repeat;
		/* #endif */
		/* #ifndef APP-PLUS */
		background: url('http://pds.jyt123.com/wxtest/banner.png') no-repeat;
		/* #endif */
		background-size: 100%;
		background-position: center center;
	}

	.icon {
		width: 100upx;
		height: 100upx;
	}
</style>
